#!/bin/sh

input=$1
SIMPLE_CLASS_FILE=`echo "$input" | sed 's/in/class/g'`
CLASS_NAME=`find bin/ -name "$SIMPLE_CLASS_FILE" | sed 's/\//./g' | sed 's/bin.//g' | sed 's/.class//g'`

echo "java -cp bin/ $CLASS_NAME < $input"
java -cp bin/ $CLASS_NAME < $input
